From: Keir Fraser Date: Tue, 18 Nov 2008 15:59:26 +0000 (+0000) Subject: x86, hvm: Fix domain restore bug with Intel VLAPIC acceleration. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14043^2~21 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=d25a1286b4cc8d9395b9f1b2366107d6c2445972;p=xen.git x86, hvm: Fix domain restore bug with Intel VLAPIC acceleration. r18383 mark video memory as ram, and make all valid pages migrated, including vlapic page (0xFEE00), and share page(0xFFFFF). An extra memory population for lapic page would override previous mapping then cause HVM guest with vlapic acceleration hang. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index f3b1fc8243..2adc1ed2c7 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -1604,6 +1604,7 @@ static int mod_l1_entry(l1_pgentry_t *pl1e, l1_pgentry_t nl1e, struct domain *d = curr->domain; unsigned long mfn; struct page_info *l1pg = mfn_to_page(gl1mfn); + p2m_type_t p2mt; int rc = 1; page_lock(l1pg); @@ -1621,8 +1622,8 @@ static int mod_l1_entry(l1_pgentry_t *pl1e, l1_pgentry_t nl1e, if ( l1e_get_flags(nl1e) & _PAGE_PRESENT ) { /* Translate foreign guest addresses. */ - mfn = gmfn_to_mfn(FOREIGNDOM, l1e_get_pfn(nl1e)); - if ( unlikely(mfn == INVALID_MFN) ) + mfn = mfn_x(gfn_to_mfn(FOREIGNDOM, l1e_get_pfn(nl1e), &p2mt)); + if ( !p2m_is_ram(p2mt) || unlikely(mfn == INVALID_MFN) ) return page_unlock(l1pg), 0; ASSERT((mfn & ~(PADDR_MASK >> PAGE_SHIFT)) == 0); nl1e = l1e_from_pfn(mfn, l1e_get_flags(nl1e));